From 9fd4e954b5df2dcb78f17603916d869f48375ea1 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 24 Nov 2011 22:00:49 +0100 Subject: [PATCH] Reftest background-origin with various background-clip values --- tests/reftests/Makefile.am | 4 + tests/reftests/background-origin.css | 65 ++++++++++ tests/reftests/background-origin.ref.ui | 19 +++ tests/reftests/background-origin.ui | 116 ++++++++++++++++++ .../reftests/reference-background-origin.png | Bin 0 -> 1960 bytes 5 files changed, 204 insertions(+) create mode 100644 tests/reftests/background-origin.css create mode 100644 tests/reftests/background-origin.ref.ui create mode 100644 tests/reftests/background-origin.ui create mode 100644 tests/reftests/reference-background-origin.png diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am index b3ffb1e784..2e0624f097 100644 --- a/tests/reftests/Makefile.am +++ b/tests/reftests/Makefile.am @@ -32,6 +32,10 @@ EXTRA_DIST += \ background-color-transparent.css \ background-color-transparent.ref.ui \ background-color-transparent.ui \ + background-origin.css \ + background-origin.ref.ui \ + background-origin.ui \ + reference-background-origin.png \ border-color-default.css \ border-color-default.ref.ui \ border-color-default.ui \ diff --git a/tests/reftests/background-origin.css b/tests/reftests/background-origin.css new file mode 100644 index 0000000000..22b22eeb2f --- /dev/null +++ b/tests/reftests/background-origin.css @@ -0,0 +1,65 @@ +* { + engine: none; + border-style: none; + border-image: none; + background-image: none; + background-clip: border-box; + background-repeat: no-repeat; + border-radius: 0; +} + +GtkWindow { + background-color: rgb(255,255,255); +} + +GtkButton { + border-width: 5; + border-style: solid; + border-color: rgba(255,0,0,0.5); + padding: 10; + background-color: rgb(0,0,255); + + background-image: url("green-20x20.png"); +} + +#button1 { + background-origin: border-box; + background-clip: border-box; +} +#button2 { + background-origin: padding-box; + background-clip: border-box; +} +#button3 { + background-origin: content-box; + background-clip: border-box; +} +#button4 { + background-origin: border-box; + background-clip: padding-box; +} +#button5 { + background-origin: padding-box; + background-clip: padding-box; +} +#button6 { + background-origin: content-box; + background-clip: padding-box; +} +#button7 { + background-origin: border-box; + background-clip: content-box; +} +#button8 { + background-origin: padding-box; + background-clip: content-box; +} +#button9 { + background-origin: content-box; + background-clip: content-box; +} + +GtkButton#reference { + border-width: 0; + background-image: url("reference-background-origin.png"); +} diff --git a/tests/reftests/background-origin.ref.ui b/tests/reftests/background-origin.ref.ui new file mode 100644 index 0000000000..d1e1cc739d --- /dev/null +++ b/tests/reftests/background-origin.ref.ui @@ -0,0 +1,19 @@ + + + + + False + popup + 154 + 680 + + + reference + True + True + True + False + + + + diff --git a/tests/reftests/background-origin.ui b/tests/reftests/background-origin.ui new file mode 100644 index 0000000000..6cc188b841 --- /dev/null +++ b/tests/reftests/background-origin.ui @@ -0,0 +1,116 @@ + + + + + False + popup + + + True + False + vertical + 5 + 5 + + + button1 + True + True + True + False + 144 + 70 + + + + + button2 + True + True + True + False + 144 + 70 + + + + + button3 + True + True + True + False + 144 + 70 + + + + + button4 + True + True + True + False + 144 + 70 + + + + + button5 + True + True + True + False + 144 + 70 + + + + + button6 + True + True + True + False + 144 + 70 + + + + + button7 + True + True + True + False + 144 + 70 + + + + + button8 + True + True + True + False + 144 + 70 + + + + + button9 + True + True + True + False + 144 + 70 + + + + + + diff --git a/tests/reftests/reference-background-origin.png b/tests/reftests/reference-background-origin.png new file mode 100644 index 0000000000000000000000000000000000000000..fb4ee239ad27700fb336ff68b6b451b06ab9bec5 GIT binary patch literal 1960 zcmeAS@N?(olHy`uVBq!ia0vp^vltkdR&X!@SqvKr&jU%eByV>YhW{YAVDIwD3=HhC zo-U3d6?5L+y_hFuDB^Ii^y+`UpGDtIxi950D?V5}bNdQTC#zjro6c69u{78Ex91n{ zhsjTTCK|h*o3cOLzCP~Q-SuBL*4lha`?2rz)7SpXfD$5>!B2d4{?jN){V)Hvv;VF2 z{8E@Ppmul`^M*}?w4TWu_}VtOu3ZbJB8o(R8#iMg4=a$&gZM| z8|9O&fNlr-Zg!~RX@~5a-;L&K7A-q5Qz`w_Nw%9iYVQ5LRJ{4#7nb(pEX&qgh)8CKYaoU`fNi2e#aB$c%_Oy z#VBsyybd{1_ygbIiIk&kH?#PjTTq zNzFN??XGYxQf52lY<{^vSLV;^>eu!2u{pakBlN_s^Sf!4tRC@g5`h;$J(jj=8xO-n z+I+Rsw8m?j-lxL+DI%S++ENGZZR9*5x2vxdTwYBbeC3t>)$1kcbN8$QRlN+Ju6{1- HoD!M